import $http from "../common/axios"

export async function getbannerList (){
    let res;
    res=await $http("/getbanner")
    return res
}

export async function getgood(){
    let res;
    res=await $http("/getindexgoods")
    return res
}

export async function getlist(){
    let res;
    res=await $http("/getcate")
    return res
}

export async function getxinxi(id){
    let res;
    res=await $http("/getgoodsinfo",id)
    return res
}

export async function getfenlei(id){
    let res;
    res=await $http("/getcategoods",id)
    return res
}

export async function getlei(fid){
    let res;
    res=await $http("/getcategoods",fid)
    return res
}

export async function zhuce(data){
    let res;
    res=await $http.post("/register",data)
    return res
}

export async function login(data){
    let res;
    res=await $http.post("/login",data)
    return res
}

export async function gouwu(data){
    let res;
    res=await $http("/cartlist",data)
    return res
}

export async function joini(data){
    let res;
    res=await $http.post("/cartadd",data)
    return res
}

export async function dele(data){
    let res;
    res=await $http.post("/cartdelete",data)
    return res
}

export async function edit(data){
    let res;
    res=await $http.post("/cartedit",data)
    return res
}
